<%= form_for(@share,:html=>{:class=>"form-horizontal"}) do |f| %>

<% if @share.errors.any? %>
 <%= render :partial=>'/layouts/errors', :locals=>{:errors=>@share.errors}%>
<% end %>


 
<%= hidden_field_tag 'doc_id', @doc.id%>
<div class="form-group">
  <label class="col-sm-2 control-label">文档名称</label>
  <div class="col-sm-4">
    <p class="form-control-static"><%= link_to @share.doc.name, doc_path(@doc) %></p>
     <%= f.hidden_field :doc_id,:readonly=>true %>
  </div>
</div>



<div class="form-group">
<label class="col-sm-2 control-label">共享用户</label>
<div class="col-sm-5">
   <% @members.each do |member|%>
    <label class="checkbox-inline">
     <input id="user_ids" name="user_ids[]" type="checkbox" value="<%= member.user.id%>"><%= member.user.name%>
    </label>
  <%end%>
</div>
</div>



<div class="form-group">
  <%= f.label "备注",:class=>"col-sm-2 control-label" %>
  <div class="col-sm-4">
    <%= f.text_field :remark, :class=>"form-control",:rows=>3%>
  </div>
</div>


<div class="form-group">
  <div class="col-sm-offset-2 col-sm-4">
      <label class="checkbox-inline"><%= f.check_box :enabled%>启用</label>
  </div>
</div>
  
<div class="form-group">
  <div class="col-sm-offset-2 col-sm-10">
    <button type="submit" class="btn btn-default btn-primary">提 交</button>
  </div>
</div> 

<% end %>
